//
//  SblbCell.swift
//  Auscultation
//
//  Created by 来 on 2020/12/10.
//

class SblbCell: UICollectionViewCell {
    
    var image_view1: UIImageView!
    var image_view2: UIImageView!
    var name: UILabel!
    var uuid: UILabel!
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        image_view1 = UIImageView.init(image: #imageLiteral(resourceName: "shebei@1.5x"))
        addSubview(image_view1)
        image_view1.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.left.equalToSuperview().offset(10)
            make.width.height.equalTo(35)
        }
        image_view2 = UIImageView.init(image: #imageLiteral(resourceName: "link"))
        addSubview(image_view2)
        image_view2.snp.makeConstraints { (make) in
            make.centerY.equalToSuperview()
            make.right.equalToSuperview().offset(-10)
            make.width.height.equalTo(35)
        }
        name = UILabel.init()
        name.text = "未知"
        name.lgf_AddShowAllText()
        name.font = UIFont.boldSystemFont(ofSize: 18)
        name.textColor = UIColor.init(lgf_HexString: "222222")
        addSubview(name)
        name.snp.makeConstraints { (make) in
            make.top.equalToSuperview().offset(2)
            make.left.equalTo(image_view1.snp.right).offset(10)
            make.right.equalTo(image_view2.snp.left).offset(-10)
            make.height.equalToSuperview().multipliedBy(0.5)
        }
        uuid = UILabel.init()
        uuid.text = ""
        uuid.lgf_AddShowAllText()
        uuid.font = UIFont.systemFont(ofSize: 10)
        uuid.textColor = UIColor.init(lgf_HexString: "8D969D")
        addSubview(uuid)
        uuid.snp.makeConstraints { (make) in
            make.bottom.equalToSuperview().offset(-2)
            make.left.equalTo(image_view1.snp.right).offset(10)
            make.right.equalTo(image_view2.snp.left).offset(-10)
            make.height.equalToSuperview().multipliedBy(0.5)
        }
        
        let line = UIView.init()
        line.backgroundColor = UIColor.init(lgf_HexString: "F1F2F4")
        addSubview(line)
        line.snp.makeConstraints { (make) in
            make.left.right.bottom.equalToSuperview()
            make.height.equalTo(1)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}

